package com.systemic.mapper;

import com.systemic.pojo.Draft;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName: DraftMapper
 * @Description: 草稿mapper
 * @Author:
 * @CreateTime: 2024-01-05 10:49
 * @Version:
 **/
@Mapper
public interface DraftMapper {

    int insert(Draft draft);

    int delete(Draft draft);

    int update(Draft draft);

    Draft selectById(@Param("id") Integer id);

    List<Draft> selectListByUid(@Param("uid") Integer uid);

    /**
     * 获取自增的id
     * @return
     */
    @Select("SELECT LAST_INSERT_ID()")
    Integer getLastInsertId();

}
